<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	response.setHeader("Cache-Control", "no-store");
	response.setHeader("Pragrma", "no-cache");
	response.setDateHeader("Expires", 0);
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<div class="guide">
	<s:if test="currentPage<=1">
		<a href="javascript:void(0);" onclick="alert('已经是第一页!');"><img src="<%=basePath%>images/guide/guide1.jpg" /></a>	
	</s:if>
	<s:else>
		<a href="#" onclick="javascript:gotopage(1,${pageSize},${totalRows},${totalPage});"><img src="<%=basePath%>images/guide/guide1.jpg" /></a>
	</s:else>
	<s:if test="currentPage<=1">
		<a href="javascript:void(0);" onclick="alert('已经是第一页!');"><img src="<%=basePath%>images/guide/guide2.jpg" /></a>
	</s:if>
	<s:else>
		<a href="#" onclick="javascript:gotopage(${currentPage-1},${pageSize},${totalRows},${totalPage});"><img src="<%=basePath%>images/guide/guide2.jpg" /></a>
	</s:else>
	<span>
	<s:bean name="org.apache.struts2.util.Counter" id="counter">
	<s:param name="first" value="1" />
	<s:param name="last" value="%{totalPage}" />
	<s:iterator>
	<s:if test="totalPage<11">
	<s:if test="current==currentPage+1">
	<span><a href="javascript:void(0);"><font color="red"><b><s:property /></b></font></a></span>
	</s:if>
	<s:else>
	<a href="#" onclick="javascript:gotopage(<s:property />,${pageSize},${totalRows},${totalPage});"><s:property /></a>
	</s:else>
	</s:if>
	<s:elseif test="current<4&&current>0">
	<s:if test="current==currentPage+1">
	<span><a href="#"><font color="red"><b><s:property /></b></font></a></span>
	</s:if>
	<s:else>
	<a href="#" onclick="javascript:gotopage(<s:property />,${pageSize},${totalRows},${totalPage});"><s:property /></a>
	</s:else>
	</s:elseif>
	<s:elseif test="totalPage-current<1">
	<s:if test="current==currentPage+1">
	<span><a href="javascript:void(0);"><font color="red"><b><s:property /></b></font></a></span>
	</s:if>
	<s:else>
	<a href="#" onclick="javascript:gotopage(<s:property />,${pageSize},${totalRows},${totalPage});"><s:property /></a>
	</s:else>
	</s:elseif>
	<s:elseif test="current-currentPage<=3&&current-currentPage>=-1">
	<s:if test="current-currentPage==-1&&currentPage!=5">
	<a href="javascript:void(0);" style="cursor:default;">..</a>
	</s:if>
	<s:if test="current==currentPage+1">
	<span><a href="javascript:void(0);"><font color="red"><b><s:property /></b></font></a></span>
	</s:if>
	<s:else>
	<a href="#" onclick="javascript:gotopage(<s:property />,${pageSize},${totalRows},${totalPage});"><s:property /></a>
	</s:else>
	<s:if test="(current-currentPage==3&&currentPage!=totalPage-4)">
	<a href="javascript:void(0);" style="cursor:default;">..</a>
	</s:if>
	</s:elseif>
	</s:iterator>
	</s:bean>
	</span>
	<s:if test="totalPage>=currentPage">
	<s:if test="totalPage==currentPage">
	<a href="javascript:void(0);" onclick="alert('已经是最后一页!');"><img src="<%=basePath%>images/guide/guide3.jpg" /></a>
	<a href="javascript:void(0);" onclick="alert('已经是最后一页!');"><img src="<%=basePath%>images/guide/guide4.jpg" /></a>
	</s:if>
	<s:else>
	<a href="#" onclick="javascript:gotopage(${currentPage+1},${pageSize},${totalRows},${totalPage});"><img src="<%=basePath%>images/guide/guide3.jpg" /></a>
	<a href="#" onclick="javascript:gotopage(${totalPage},${pageSize},${totalRows},${totalPage});"><img src="<%=basePath%>images/guide/guide4.jpg" /></a>
	</s:else>
	</s:if>
	<a>当前页</a>
	<input type="text" value="" name="goto" id="gotopage" onKeyDown="doPageKeyDown(event,document.getElementById('gotopage').value,${pageSize},${totalRows},${totalPage});" style="width: 40px; float: left;" />
	<a href="javascript:void(0);" onclick="javascript:gotopage(document.getElementById('gotopage').value,${pageSize},${totalRows},${totalPage});"><img src="<%=basePath%>images/guide/guide5.jpg" /></a>
</div>
<input id="totalRows" name="totalRows" type="hidden" value="${totalRows}" />
<input id="totalPage" name="totalPage" type="hidden" value="${totalPage}" />
<input id="currentPage" name="currentPage" type="hidden" value="${currentPage}" />
